/* 
 * File:   graph_algos.h
 * Author: aishwarya
 *
 * Created on March 12, 2011, 1:54 PM
 */

#ifndef GRAPH_ALGOS_H
#define	GRAPH_ALGOS_H

#include "../DataStructures/graph.h"
#include "../DataStructures/disjoint_sets.h"

#ifdef	__cplusplus
extern "C" {
#endif

    /*
     * Implements Dijkstra Single-Source Shortest Path algorithm.
     * The main data structure MIN-PRIORITY-QUEUE used in this algorithm uses a
     * MIN-BINARY-HEAP.
     */
    void dijkstra(GRAPH *g, int start, int dist[], int path[]);

    /* Implements Kruskal's Algorithm to find Minimum Spanning Tree of a weighted Graph */
    weight mst_kruskal(GRAPH *g) ;

    /* Passed a userfn() to work on the output disjoint set data structure */
    void connected_components(GRAPH *g, void (*userfn)(disjoint_sets *s)) ;


#ifdef	__cplusplus
}
#endif

#endif	/* GRAPH_ALGOS_H */

